import time

from appium import webdriver
from appium.webdriver.common.mobileby import MobileBy
from appium.webdriver.extensions.android.gsm import GsmCallActions
from selenium.webdriver import ActionChains
from selenium.webdriver.support import expected_conditions

from utils import *


class TestBrowser:
    def setup(self):
        desired_caps = {
            'platformName': 'Android',
            'platformVersion': '6.0',
            'deviceName': '192.168.57.103:5555',
            'noReset': True,
            "browserName": "Browser",
        }

        self.driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps)
        self.driver.implicitly_wait(5)

    def test_browser(self):
        self.driver.get('http://m.baidu.com')
        time.sleep(5)